/* 
 * File:   JClient.h
 * Author: johnneyshi
 *
 * Created on 2013年1月28日, 下午1:43
 */

#ifndef JCLIENT_H
#define	JCLIENT_H
#include <string>

class JClient {
public:
    JClient(std::string _ip = "",int _port = 0);
    //JClient(const JClient& orig);
    virtual ~JClient();
    //void Bind();
    void Connect(std::string _ip,int _port);
    int GetConnFd();
    std::string GetClientIP();
    int GetClientPort();
    std::string GetServerIP();
    int GetServerPort();
    //发送数据
    void Send(const char* _msg,int size);
    //接受数据
    int Recv(char* _msg,int size);
private:
    int connFd;
    std::string clientIP;
    int clientPort;
    std::string serverIP;
    int serverPort;
};

#endif	/* JCLIENT_H */

